import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

const constantRouterMap = [
    /* // 作为动态路由
    {
        path: '/',
        component: () => import('@/views/HomeView'),
        redirect: '/data-overview',
        meta: {
            title: '首页'
        },
        children: [
            {
                path: 'data-overview',
                component: () => import('@/views/data/DataOverview'),
                meta: {
                    title: '数据总览'
                }
            },
            {
                path: 'user-data',
                component: () => import('@/views/user/UserData'),
                meta: {
                    title: '用户数据'
                }
            },
            {
                path: 'user-permission',
                component: () => import('@/views/user/UserPermission'),
                meta: {
                    title: '用户权限'
                }
            },
            {
                path: 'user-feedback',
                component: () => import('@/views/user/UserFeedback'),
                meta: {
                    title: '用户反馈'
                }
            },
            {
                path: 'video-data',
                component: () => import('@/views/video/VideoData'),
                meta: {
                    title: '视频数据'
                }
            },
            {
                path: 'video-audit',
                component: () => import('@/views/video/VideoAudit'),
                meta: {
                    title: '视频审核'
                }
            },
            {
                path: 'video-complain',
                component: () => import('@/views/video/VideoComplain'),
                meta: {
                    title: '视频投诉'
                }
            },
            {
                path: 'article-data',
                component: () => import('@/views/article/ArticleData'),
                meta: {
                    title: '文章数据'
                }
            },
            {
                path: 'article-audit',
                component: () => import('@/views/article/ArticleAudit'),
                meta: {
                    title: '文章审核'
                }
            },
            {
                path: 'article-complain',
                component: () => import('@/views/article/ArticleComplain'),
                meta: {
                    title: '文章投诉'
                }
            },
            {
                path: 'site-setting',
                component: () => import('@/views/site/SiteSetting'),
                meta: {
                    title: '整站设置'
                }
            }
        ]
    }, */
    {
        path: '/login',
        component: () => import('@/views/common/LoginView'),
        meta: {
            title: "登录"
        }
    },
    {
        path: '*',
        component: () => import('@/views/common/404'),
        meta: {
            title: 'Not Found'
        }
    }
]



export default new Router({
    mode: 'hash',
    routes: constantRouterMap
})